#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>

using namespace std;

void setZeroes(vector<vector<int>>& matrix) {
    vector<bool> row(matrix.size());
    vector<bool> col(matrix[0].size());

    for (int i = 0; i < matrix.size(); i++)
        for (int j = 0; j < matrix[0].size(); j++)
            if (matrix[i][j] == 0)
            {
                row[i] = true;
                col[j] = true;
            }

    for (int i = 0; i < matrix.size(); i++)
        for (int j = 0; j < matrix[0].size(); j++)
            if (row[i] || col[j])
                matrix[i][j] = 0;
}

//bool detectCapitalUse(string word) {
//    if (word.size() >= 2 && islower(word[0]) && isupper(word[1]))
//        return false;
//
//    for (int i = 2; i < word.size(); i++)
//        if (islower(word[i]) ^ islower(word[1]))
//            return false;
//    return true;
//}